package com.merchant.web;


import com.alibaba.dubbo.config.annotation.Reference;
import com.merchant.pojo.Redpacket;
import com.merchant.service.RedpackeSeivice;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.List;

/**
 * @author zgg
 * 红包控制器
 */
@Controller
public class RedpacketCtroller {
    @Reference
    RedpackeSeivice redpackeSeivice;
    @GetMapping("/redpacketlist")
    public  String  redpacketlist(Model model){
        List<Redpacket>list=redpackeSeivice.findAll();
        model.addAttribute("list",list);
        return  "redpacketlist";
    }





}
